<html>
<head><meta charset="utf-8"><title>rustc - incremental comp · t-compiler/wg-incr-comp · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/index.html">t-compiler/wg-incr-comp</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/rustc.20-.20incremental.20comp.html">rustc - incremental comp</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="220606258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/rustc%20-%20incremental%20comp/near/220606258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> kev <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/rustc.20-.20incremental.20comp.html#220606258">(Dec 21 2020 at 17:10)</a>:</h4>
<p>Hi, </p>
<p>are there any ideas/rfcs on how rustc will allow for incremental compilation between compilation sessions?</p>



<a name="220606541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/rustc%20-%20incremental%20comp/near/220606541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> kev <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/rustc.20-.20incremental.20comp.html#220606541">(Dec 21 2020 at 17:13)</a>:</h4>
<p>My thought was that you'd need to save some information to disk about files which have been compiled/last modified and since you are going towards a query based system, you'd probably need to save the queries too. Which may lead to a large amount of data being saved to disk I think</p>



<a name="220606904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/rustc%20-%20incremental%20comp/near/220606904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/rustc.20-.20incremental.20comp.html#220606904">(Dec 21 2020 at 17:17)</a>:</h4>
<p><span class="user-mention" data-user-id="369769">@kev</span> rustc has had incremental compilation for some time now. You can read about it in the dev guide: <a href="https://rustc-dev-guide.rust-lang.org/query.html">https://rustc-dev-guide.rust-lang.org/query.html</a></p>



<a name="220607267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/rustc%20-%20incremental%20comp/near/220607267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> kev <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/rustc.20-.20incremental.20comp.html#220607267">(Dec 21 2020 at 17:20)</a>:</h4>
<p>The guide says that incremental compilation is a simple extension to the query system, I thought that the query system was not implemented yet?</p>



<a name="220607402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/rustc%20-%20incremental%20comp/near/220607402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/rustc.20-.20incremental.20comp.html#220607402">(Dec 21 2020 at 17:22)</a>:</h4>
<p>not 100% of the compiler uses the query system (I think macro expansion still runs from scratch each time), but the vast majority does</p>



<a name="220607609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/rustc%20-%20incremental%20comp/near/220607609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> kev <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/rustc.20-.20incremental.20comp.html#220607609">(Dec 21 2020 at 17:24)</a>:</h4>
<p>Oh I see, and I also see the section about persisting to disk, thank you</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>